package com.wanglei.es.repositories;

import com.wanglei.es.bean.Article;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

public interface ArticleRepository extends ElasticsearchRepository<Article,Long> {
    /**
     * 根据name查询
     */
    List<Article> findByName(String name);
    /**
     * 根据name查询,携带分页信息
     */
    List<Article> findByName(String name, Pageable pageable);
}
